package com.uwlaser.service.mapper;

import com.uwlaser.base.CommonMapper;
import com.uwlaser.domain.DeviceOnline;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* @author zk-Qin
* @date 2022-05-11
*/
@Repository
public interface DeviceOnlineMapper extends CommonMapper<DeviceOnline> {

    List<DeviceOnline> getOnlineByCodes(@Param("codes") List<String> codes, @Param("date") String three_days_ago);

    /**
     * 根据设备编号获取最新的在线状态记录
     * @param deviceCodes
     * @return
     */
    List<DeviceOnline> getMaxDeviceOnlineByDeviceCodes(@Param("list") List<String> deviceCodes);
}
